package com.lplb.api.admin.service.platform;


import com.lplb.api.admin.model.dto.AdminUserDTO;
import com.lplb.common.core.constant.base.BaseConstant;
import com.lplb.common.core.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 管理平台登录/注册
 * @author wangsong
 * @mail 1720696548@qq.com
 * @date 2020/7/18 0018 11:25 
 * @version 1.0.0
 */
@Api(value = "LoginService", tags = "pt--注册/登录",description= BaseConstant.Sys.MANAGEMENT_SIDE)
@RequestMapping(value = "/platform/logInRegister", name = "注册/登录")
public interface LoginService  {


    /**
     * 登录
     * @author wangsong
     * @param username
     * @param password
     * @date 2020/7/18 0018 11:26
     * @return void
     * @version 1.0.0
     */
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    @ApiOperation("登录")
    public R<Void> login(String username, String password);


    /**
     * 注册
     * @author wangsong
     * @param dto 注册信息
     * @date 2020/7/18 0018 11:26
     * @return void
     * @version 1.0.0
     */
    @RequestMapping(value = "/register", method = RequestMethod.POST)
    @ApiOperation("注册")
    public void register(@RequestBody @Validated AdminUserDTO dto);


    /**
     * 退出登录
     * @author wangsong
     * @date 2020/7/18 0018 11:26
     * @return void
     * @version 1.0.0
     */
    @RequestMapping(value = "/outLogin", method = RequestMethod.POST)
    @ApiOperation("退出登录")
    public void outLogin();
}


